package com.yourcompany.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yourcompany.api.dto.FileQueryDTO;
import com.yourcompany.api.entity.SysFile;
import com.yourcompany.api.vo.FileUploadVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface SysFileService extends IService<SysFile> {
    
    /**
     * 分页查询文件
     */
    IPage<SysFile> pageFiles(IPage<SysFile> page, FileQueryDTO queryDTO);
    
    /**
     * 上传文件
     */
    FileUploadVO uploadFile(MultipartFile file, String businessType, String businessId);
    
    /**
     * 批量上传文件
     */
    List<FileUploadVO> batchUploadFiles(MultipartFile[] files, String businessType, String businessId);
    
    /**
     * 删除文件
     */
    void deleteFile(Long id);
    
    /**
     * 根据业务类型和业务ID删除文件
     */
    void deleteByBusiness(String businessType, String businessId);
} 